package com.test.prolenders.analytics_prolenders.data_sdk_prolenders.services_prolenders;

import android.content.Context;

import com.google.gson.Gson;
import com.test.prolenders.analytics_prolenders.data_sdk_prolenders.beans_prolenders.ASStoreBn_prolenders;
import com.test.prolenders.analytics_prolenders.data_sdk_prolenders.util_prolenders.ASStoreUtil_prolenders;
import com.test.prolenders.analytics_prolenders.data_sdk_prolenders.util_prolenders.ASUtil_prolenders;

public class ASStoeIfo_prolenders {

    public static ASStoreBn_prolenders getDatas(final Context paramContext) {
        ASStoreBn_prolenders bean = new ASStoreBn_prolenders();
        try {
            bean.setContainSd(ASStoreUtil_prolenders.getContainSD());
            bean.setRamCanUse(ASStoreUtil_prolenders.getRamCanUse(paramContext));
            bean.setRamTotal(ASStoreUtil_prolenders.getRamTotal(paramContext));
            bean.setCashCanUse(ASStoreUtil_prolenders.getCashCanUse(paramContext));
            bean.setCashTotal(ASStoreUtil_prolenders.getCashTotal(paramContext));
            bean.setExtraSD(ASStoreUtil_prolenders.getExtraSD(paramContext, 1));
            bean.setInternalTotal(ASStoreUtil_prolenders.getTotalInternalStoreSize(paramContext));
            bean.setInternalAvailable(ASStoreUtil_prolenders.getAvailaInternalStoreSize(paramContext));
            bean.setRamDidUsed(ASStoreUtil_prolenders.getRamDidUsed(paramContext));
            bean.setCashDidUsed(ASStoreUtil_prolenders.getCashDidUsed(paramContext));
            bean.setSdCardTotal(ASStoreUtil_prolenders.getSDCardTotal(paramContext));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return bean;
    }

    public static String getZipString(Context paramContext) {
        String zipString = "";
        try {
            ASStoreBn_prolenders infoBean = getDatas(paramContext);
            String result = new Gson().toJson(infoBean).trim();
            zipString = ASUtil_prolenders.stringToGZIP(result);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return zipString;
    }

}
